package com.fan.leetcode;

/**
 * 9. 回文数
 *
 * @author ZhangFan
 * @since 2021/9/2 下午 6:30
 */
public class Question9 {
    public boolean isPalindrome(int x) {
        if (x < 0) {
            return false;
        }
        long i = Long.parseLong(new StringBuilder(Integer.toString(x)).reverse().toString());
        return x == i;
    }
}
